import React from 'react';
import { View, Text, Button } from 'react-native';


class TitleBox extends React.Component {
  render() {
    return (
      <Text>自定义标题</Text>
    )
  }
}

class News extends React.Component {
  static navigationOptions = {
    headerTitle: <TitleBox/>,
    // header: null
  };
  render() {
    return (
      <View style={{ flex: 1, alignItems: 'center', justifyContent: 'center' }}>
        <Text>News Screen</Text>
        <Text onPress={()=>{
          this.props.navigation.popToTop()
        }}>返回首页</Text>
      </View>
    );
  }
}

export default News
